'use strict'


import request from '@/utils/request'
// 上传文件
export function upload(data) {
  return request({
    url: '/Attachment/UploadFiles',
    method: 'post',
    data
  })
}

// 上传文件  注册页面调用
export function PublicUpload(data) {
  return request({
    url: '/Public/UploadFiles',
    method: 'post',
    data
  })
}

export function uploadAttach(data) {
  return request({
    url: '/CommonAttach/UploadFile',
    method: 'post',
    data
  })
}

//获取附件详情
export function getAttCode(parameter) {
  return request({
    url: '/CommonAttach/GetAttCode',
    method: 'get',
    params: parameter
  })
}
// 获取风险位置部门列表
export function getDepartList(parameter) {
  return request({
    url: '/UserUser/GetChooseOrgPageData',
    method: 'get',
    params: parameter
  })
}
// 获取风险位置编辑部门列表
export function getRiskDepartList(parameter) {
  return request({
    url: '/UserUser/GetChooseOrgList',
    method: 'get',
    params: parameter
  })
}

// 获取班组信息
export function getChooseTeamList(parameter) {
  return request({
    url: '/UserUser/GetChooseTeamList',
    method: 'get',
    params: parameter
  })
}

// 获取岗位信息
export function getChoosePostList(parameter) {
  return request({
    url: '/UserUser/GetChoosePostList',
    method: 'get',
    params: parameter
  })
}

// 获取人员信息
export function getChooseUserList(parameter) {
  return request({
    url: '/UserUser/GetChooseUserList',
    method: 'get',
    params: parameter
  })
}

export function GetChooseUserPageData(parameter) {
  return request({
    url: '/UserUser/GetChooseUserPageData',
    method: 'get',
    params: parameter
  })
}


export function CommonAttachUploadBase64(data) {
  return request({
    url: '/CommonAttach/UploadBase64',
    method: 'post',
    data
  })
}


//任命书签名
export function SiteAppointmentSign(data) {
  return request({
    url: '/SiteAppointment/Sign',
    method: 'post',
    data
  })
}

//承诺书文件签名
export function SitePromiseRecordSign(data) {
  return request({
    url: '/SitePromiseRecord/Sign',
    method: 'post',
    data
  })
}

// http://139.196.18.102:8020/api/SiteSafeCostPlanMain/Sign

export function SiteSafeCostPlanMainSign(data) {
  return request({
    url: '/SiteSafeCostPlanMain/Sign',
    method: 'post',
    data
  })
}

//责任书签名
export function ResponsibilityOrgPostUserDepositManageSign(data) {
  return request({
    url: '/ResponsibilityOrgPostUserDepositManage/Sign',
    method: 'post',
    data
  })
}


export function getMenuByMenuCode(menuCode) {
  return request({
    url: '/SysPhoneMenu/getMenuByMenuCode',
    method: 'get',
    params: {
      menuCode: menuCode
    }
  })
}